<!DOCTYPE html>
<html>
<head>
    <th:block th:include="include :: header('单位资料-互助保障系统')"/>
</head>
<body>

<div class="page">

    <th:block th:include="include :: unLoginTop"/>


    <div class="center">
        <div class="page-content">
            <div class="page-forgot-password">
                <div class="page-tab">
                    <a href="/unit/getUnitPassword">单位账号找回</a>
                    <%-- <a class="on" href="/unit/mobileGetPassword">手机号找回密码</a>
                    <a href="/unit/emailGetPassword">邮箱找回密码</a> --%>
                    <a href="/unit/contactGetPassword">联系管理员找回密码</a>
                </div>
                <h2>手机号找回密码</h2>
                <form class="page-search" method="post" style="position:static;">
                    <div class="page-form-item">
                        <div class="page-form-label">单位账号：</div>
                        <div class="page-form-input">
                            <input type="text" id="account" style="width:260px" name="account"/>
                        </div>
                    </div>
                    <div class="page-form-item">
                        <div class="page-form-label">单位手机号：</div>
                        <div class="page-form-input">
                            <input type="text" id="mobile" style="width:120px" name="mobile"/>
                        </div>
                    </div>
                    <div class="page-form-item">
                        <div class="page-form-input">
                            <a class="layui-btn" id="submitForm"><i class="fa fa-search"></i> 搜索</a>
                        </div>
                    </div>
                </form>
            </div>

        </div>
    </div>

    <th:block th:include="include :: footer"/>

</div>


<script src="/footerjs.js"></script>


<script type="text/javascript">

    $(".page-form select[name=CategoryID]").val(17);
    $(".page-form select[name=OrganizeID]").val(44);

    $("#submitForm").click(function () {
        var account = $("#account").val();
        var mobile = $("#mobile").val();
        if (!account) {
            layer.msg("请输入单位账号！");
        } else if (!mobile) {
            layer.msg("请输入单位手机号！");
        } else {
            $.ajax({
                url: "${ctx}/hzunit/unit/hzUnit/checkMobile",
                data: $(".page-search").serialize(),
                success: function (data) {
                    if (data.success) {
                        layer.msg("操作成功，新密码已发送到您输入的单位联系手机号中，请注意查收！");
                    } else {
                        layer.msg(data.msg);
                    }
                }
            });
        }

    });

</script>
</body>
</html>
